package com.mark.web.bill.entity.from;

import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

/**
 * @Description: 添加加工零件的表单验证
 * @Author: Mark
 * @CreateDate: 2019/2/2 22:41
 * @Version: 2.0
 * @Copyright : 豆浆油条个人非正式工作室
 */
@Data
@ApiModel(value = "账单新增表单")
public class AddGoodsFrom {

    /**
     * 商品名称
     */
    @NotBlank(message = "输入的商品名称不能空！")
    private String goodsName;

    /**
     * 单价,单位-元保留两位小数
     */
    @Min(value = 0,message = "单价应该大于0")
    private BigDecimal price;

    /**
     * 排序权重
     */
    @Min(value = 1,message = "权重值应该大于1")
    private Integer priority;

    /**
     * 逻辑外键，加工零件id
     */
    @Min(value = 0,message = "输入种类id应大于0")
    private Integer fkCategoryId = 1;
}
